package com.example.Project.server;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.concurrent.BlockingQueue;

public class ConnectionPool {
    private static final String DB_URL = "jdbc:mysql://localhost:3306/javafx2";
    private static final String USER = "root";
    private static final String PASSWORD = "248123";
    private static final int MAX_CONNECTIONS = 10;
    private BlockingQueue<Connection> connectionQueue;

    public ConnectionPool() {
    }

    public static Connection connect() throws ClassNotFoundException {
        try {
            Class.forName("java.sql.Driver");
            return DriverManager.getConnection("jdbc:mysql://localhost:3306/javafx2", "root", "248123");
        } catch (SQLException var1) {
            var1.printStackTrace();
            return null;
        }
    }
}